//
//  DCWebViewController.h
//  DCProject
//
//  Created by bigbing on 2019/4/1.
//  Copyright © 2019 bigbing. All rights reserved.
//

#import "DCBasicViewController.h"
#import "NJKWebViewProgressView.h"
#import <WebKit/WKWebView.h>
#import <WebKit/WebKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface DCWebViewController : DCBasicViewController<WKNavigationDelegate, WKUIDelegate>

/**
 初始化
 
 @param url web页面地址
 @return WHBaseWebViewController
 */
- (instancetype)initWithUrl:(NSString *)url;

/**
 初始化
 
 @param request 请求
 @return WHBaseWebViewController
 */
- (instancetype)initWithRequest:(NSURLRequest *)request;

- (instancetype)initWithHtml:(NSString*)html;


@property (nonatomic,strong) NSString * titleString;
@property (nonatomic,assign) BOOL showNav;

@end

@interface WeakScriptMessageDelegate : NSObject<WKScriptMessageHandler>

@property (nonatomic, weak) id<WKScriptMessageHandler> scriptDelegate;

- (instancetype)initWithDelegate:(id<WKScriptMessageHandler>)scriptDelegate;

@end

NS_ASSUME_NONNULL_END
